home *** CD-ROM | disk | FTP | other *** search
/ SGI Varsity Update 1998 August / SGI Varsity Update 1998 August.iso / docs / relnotes / ftn90_fe / ch7.z / ch7
Text File  |  1998-07-29  |  14KB  |  594 lines

  1.  
  2.  
  3.  
  4.                                                - 1 -
  5.  
  6.  
  7.  
  8.                     7.2.1 MIPSpro Fortran 90 Front End Release Notes
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.                                                - 2 -
  69.  
  70.  
  71.  
  72.                     7.  _B_u_g__F_i_x_e_s
  73.  
  74.  
  75.  
  76.                     7.1  _B_u_g_s__F_i_x_e_d__i_n__M_I_P_S_p_r_o__7_._2_._1
  77.  
  78.                     This chapter briefly describes the bugs that
  79.                     have been fixed in MIPSpro 7.2.1 F90 since
  80.                     release 7.2.  Some of the headings are followed
  81.                     by a Silicon Graphics incident report number.
  82.  
  83.                        +o A bug that can arise only in the presence
  84.                          of Fortran-90 internal procedures and
  85.                          equivalences between variables, under the
  86.                          following conditions:
  87.  
  88.                             +o There exist two variables equivalenced
  89.                               to each other, and
  90.  
  91.                             +o an internal procedure refers to
  92.                               exactly one of the two, and
  93.  
  94.                             +o the containing procedure refers only
  95.                               to the other one.
  96.  
  97.                          Under those conditions, the 7.2MR compiler
  98.                          without the patch may optimize the code for
  99.                          the containing procedure as if a call to
  100.                          the internal procedure could not read or
  101.                          write the equivalenced variables, when in
  102.                          fact it can. Here is an example program
  103.                          demonstrating the failure (taken from the
  104.                          bug report):
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.                                                - 3 -
  135.  
  136.  
  137.  
  138.                          program test4
  139.                             integer     i,k
  140.                             equivalence (i,k)
  141.                             i = 1
  142.                             call s
  143.                             if (i .eq. 5) then
  144.                                 print *, 'pass'
  145.                                 call exit (0)
  146.                             else
  147.                                 print *, 'fail', i
  148.                                 call exit (1)
  149.                             endif
  150.                          contains
  151.                             subroutine s
  152.                                k = 5
  153.                             end subroutine s
  154.                          end program  test4
  155.  
  156.                          For this example program, the failure
  157.                          occurred only at the -O3 optimization
  158.                          level, but in principle it could arise at
  159.                          -O2 as well. (Bug #524653) This has been
  160.                          fixed.
  161.  
  162.                        +o -O3 and/or -pfa fail in a few cases where
  163.                          nested f90 procedures refer to local arrays
  164.                          from the parent procedure. This has been
  165.                          fixed. (Bug #524677)
  166.  
  167.                        +o Wrong answers -O2 with F90 ptrs & common.
  168.                          This has been fixed. (Bug #537859)
  169.  
  170.                          The following test case would produce
  171.                          incorrect results at runtime when compiled
  172.                          at optimization level -O2 and higher.
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.                                                - 4 -
  201.  
  202.  
  203.  
  204.                          PROGRAM MAIN
  205.                             interface
  206.                                SUBROUTINE SUB1( OVER1 )
  207.                                   !USE TYPES
  208.                                   INTEGER, POINTER::  OVER1
  209.                                end SUBROUTINE SUB1
  210.                             end interface
  211.                             !USE TYPES
  212.                             INTEGER ,TARGET :: INT2
  213.                             COMMON /WHATEVER/ INT2
  214.  
  215.                             !
  216.                             INTEGER, POINTER :: OVER1
  217.  
  218.                             INT2 = -7
  219.                             OVER1 => INT2
  220.  
  221.                             CALL SUB1( OVER1)
  222.  
  223.                          end PROGRAM MAIN
  224.                          !***********************************************************************
  225.                          SUBROUTINE SUB1( OVER1 )
  226.                             !USE TYPES
  227.                             INTEGER, POINTER::  OVER1
  228.                             INTEGER ,TARGET :: INT2
  229.                             COMMON /WHATEVER/ INT2
  230.                             !
  231.                             !  Should be able to change INT2 using the OVER2%UNDER1 pointer
  232.                             OVER1 = 123
  233.                             IEXPECT = 123
  234.                             IF( INT2 .NE. IEXPECT ) THEN
  235.                                 WRITE(6, '(" Test case 1.13 int pointer failed, expected ",I10, ",&
  236.                                      & got ", I10 )' ) IEXPECT,int2
  237.                             ENDIF
  238.                             print *,'done'
  239.                          end subroutine SUB1
  240.  
  241.                          This has been fixed.
  242.  
  243.                        +o Code that contains internal procedures may
  244.                          not be generated correctly when the -IPA or
  245.                          -INLINE flags are used. Under certain
  246.                          circumstances, internal compiler errors may
  247.                          be generated. (Bug 511830). This has been
  248.                          fixed, but the code generated, while
  249.                          correct, may not be optimal.
  250.  
  251.  
  252.                        +o Bad I/O with INTEGER(1) items in a derived
  253.                          type
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.                                                - 5 -
  267.  
  268.  
  269.  
  270.                          Bad output was generated when doing I/O on
  271.                          arrays of derived type with integer(1) and
  272.                          integer(2) elements in them. For example:
  273.  
  274.                          %cat iob1.f90
  275.  
  276.                          PROGRAM test
  277.  
  278.                            INTEGER :: i
  279.                            INTEGER, PARAMETER :: numElements = 4
  280.  
  281.                            TYPE mytype
  282.                               INTEGER (KIND=1) :: i1
  283.                            END TYPE mytype
  284.  
  285.                            TYPE(mytype) :: arr(numElements)
  286.  
  287.                            arr(1) = mytype(1)
  288.                            arr(2) = mytype(3)
  289.                            arr(3) = mytype(5)
  290.                            arr(4) = mytype(7)
  291.                            print *,arr
  292.  
  293.                          END PROGRAM test
  294.  
  295.                          %f90 iob1.f90
  296.                          %a.out
  297.                           1,  -1,  -1,  -1
  298.  
  299.                          Correct Output is:
  300.                           1,   3,   5,   7
  301.  
  302.  
  303.  
  304.                          This has been fixed (Bug #523046)
  305.  
  306.  
  307.                        +o The following program would abort when
  308.                          compiled with 7.2 as follows:
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.                                                - 6 -
  333.  
  334.  
  335.  
  336.                          %cat x.f90
  337.                                  program test
  338.                                  i = 1
  339.                                  j = 2
  340.                          1030    format(1x,l2)
  341.                                  write(6,1030)i.ne.j
  342.                                  write(6,1030) .not. i.ne.j
  343.  
  344.                          %f90 x.f90
  345.                          %a.out
  346.                            T
  347.  
  348.                          lib-4171 : UNRECOVERABLE library error
  349.                            An output list item is incompatible with its data edit-descriptor.
  350.  
  351.                          Encountered during a sequential formatted WRITE to unit 6
  352.                          Fortran unit 6 is connected to a sequential formatted text file
  353.                            (standard output).
  354.                           Current format:  1030 FORMAT(1x,l2)
  355.                                                           ^
  356.                          IOT Trap
  357.                          Abort (core dumped)
  358.  
  359.  
  360.                          This has been fixed (Bug #526202).
  361.  
  362.  
  363.                        +o F90 printing wrong values for derived type
  364.                          containing char
  365.  
  366.                          The following test program would print
  367.                          wrong values when compiled with 7.2:
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.                                                - 7 -
  399.  
  400.  
  401.  
  402.                          %cat x.f90
  403.                                  integer ::i
  404.                                  integer, parameter :: numelements = 4
  405.                                  type struct6
  406.                                  character*3::c1
  407.                                  end type struct6
  408.                                  type(struct6) :: arr6(numelements)
  409.                                  arr6(1)%c1 = 'abc'
  410.                                  arr6(2)%c1 = 'def'
  411.                                  arr6(3)%c1 = 'ghi'
  412.                                  arr6(4)%c1 = 'jkl'
  413.                                  print *,arr6
  414.                                  end
  415.  
  416.                          %f90 x.f90
  417.                          abcbcdcdedef
  418.  
  419.                          Correct is: abcdefghijkl
  420.  
  421.  
  422.                          This has been fixed (Bug #526541)
  423.  
  424.                        +o When the CSIN intrinsic function is used as
  425.                          a dummy argument, and the -r8 or -default64
  426.                          switch is specified, the compiler generates
  427.                          an incorrect library entry point. At link
  428.                          time, the symbol x_sin_ will be undefined.
  429.                          This has been fixed. (Bug #707605).
  430.  
  431.  
  432.                     7.2  _B_u_g_s__F_i_x_e_d__i_n__M_I_P_S_p_r_o__7_._2
  433.  
  434.                     This chapter briefly describes the bugs that
  435.                     have been fixed in MIPSpro 7.2 F90 in the
  436.                     compiler since release 7.1.  Some of the
  437.                     headings are followed by a Silicon Graphics
  438.                     incident report number.
  439.  
  440.                        +o Rejecting -p flag
  441.                          The following code would core dump when
  442.                          compiled with -p.
  443.  
  444.                          a = 1.0
  445.                          b = 2.0
  446.                          c = matmul(a,b)
  447.                          print *, c
  448.                          stop
  449.                          end
  450.  
  451.                          As -p is no longer supported; the user
  452.                          should use ssrun -pcsamp, etc. to do pc-
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.                                                - 8 -
  465.  
  466.  
  467.  
  468.                          sampling.  The compiler was changed to
  469.                          reject -p with a warning.  (Bug #444089)
  470.  
  471.  
  472.                        +o f90 fails: CVTEXPR-operation_type=72 should
  473.                          not reach IL conversion
  474.                          Under certain circumstances the 7.1 version
  475.                          of f90 would abort with the following
  476.                          error:
  477.  
  478.  
  479.                          CVTEXPR-operation_type=72 should not reach IL conversion.
  480.                           ### fatal error                Internal Error : unexpected type_of_operation
  481.  
  482.  
  483.                           ### Internal Error : unexpected type_of_operation
  484.                           *** while processing routine VIZ_GET_SET_STATS
  485.  
  486.                           *** while processing routine VIZ_GET_SET_STATS
  487.  
  488.                          This has been fixed.  (Bug #455088)
  489.  
  490.  
  491.  
  492.                        +o Internal Error : unexpected
  493.                          type_of_operation with Cray directive
  494.                          Use of Cay style directives (even if
  495.                          commented out) causes the compiler to
  496.                          abort.  This has been fixed.  (Bug #455685)
  497.  
  498.  
  499.                        +o ### Null ST in Make_ID_ND
  500.                          Under certain circumstances, the f90
  501.                          compiler would abort with the following
  502.                          error:
  503.  
  504.  
  505.                          ### Compiler Error (user routine 'transport_') during Front End Driver phase:
  506.                          ### Null ST in Make_ID_ND
  507.                          Signal: SIGSEGV in Front End Driver phase.
  508.  
  509.                          This has been fixed.  (Bug #456246)
  510.  
  511.  
  512.                        +o Internal Error: Not yet translated
  513.                          Under certain circumstances, the f90
  514.                          compiler would abort with the following
  515.                          error:
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.                                                - 9 -
  531.  
  532.  
  533.  
  534.                           ### fatal error                Internal Error : Not yet translated
  535.  
  536.  
  537.                           ### Internal Error : Not yet translated
  538.  
  539.                          This has been fixed.  (Bug #460856)
  540.  
  541.  
  542.                        +o f90 compilation fails on transfer() with
  543.                          CHARACTER(*) source
  544.                          This has been fixed.  (Bug #479806)
  545.  
  546.  
  547.                        +o Internal Error : predecessors
  548.                          Under certain circumstances, the f90
  549.                          compiler would abort with the following
  550.                          error:
  551.  
  552.  
  553.                           ### fatal error                Internal Error : predecessors
  554.  
  555.  
  556.                           ### Internal Error : predecessors
  557.  
  558.                          This has been fixed.  (Bug #495858)
  559.  
  560.  
  561.                        +o -freeform with comments hang fef90
  562.                          Under certain circumstances if use of
  563.                          -freeform in f90 compilations would cause
  564.                          the compilation to hang.  This has been
  565.                          fixed.  (Bug #512153)
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.  
  592.  
  593.